package net.aaa.hotel.controller;


import net.aaa.hotel.dao.StaffLeavingDao;
import net.aaa.hotel.util.LayuiTable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;

@Controller
public class StaffLeavingController {
    @Autowired
    private StaffLeavingDao staffLeavingDao;
    @RequestMapping("getAll")
    @ResponseBody
    public  LayuiTable  getAll(){

        List<Map> maps=staffLeavingDao.queryYG();
        LayuiTable la=new LayuiTable(maps.size(), maps);
        System.out.println(la);
        return la;
    }
}
